package com.yyz.zjjcms.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


/**
 * Choose entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "choose", catalog = "zjjcms")
public class Choose implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 8274371282396878440L;
	private String id;
	private CmsAttribute cmsAttribute;
	private CmsAttributeValue cmsAttributeValue;
	private String name;
	private String valueName;
	private String value;

	// Constructors

	/** default constructor */
	public Choose() {
	}

	/** minimal constructor */
	public Choose(String id, CmsAttribute cmsAttribute,
			CmsAttributeValue cmsAttributeValue) {
		this.id = id;
		this.cmsAttribute = cmsAttribute;
		this.cmsAttributeValue = cmsAttributeValue;
	}

	/** full constructor */
	public Choose(String id, CmsAttribute cmsAttribute,
			CmsAttributeValue cmsAttributeValue, String name, String valueName,
			String value) {
		this.id = id;
		this.cmsAttribute = cmsAttribute;
		this.cmsAttributeValue = cmsAttributeValue;
		this.name = name;
		this.valueName = valueName;
		this.value = value;
	}

	// Property accessors
	@Id
	@Column(name = "Id", nullable = false, length = 36)
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "org.hibernate.id.UUIDGenerator")
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cms_attribute_id", nullable = false)
	public CmsAttribute getCmsAttribute() {
		return this.cmsAttribute;
	}

	public void setCmsAttribute(CmsAttribute cmsAttribute) {
		this.cmsAttribute = cmsAttribute;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cms_ attribute_value_id", nullable = false)
	public CmsAttributeValue getCmsAttributeValue() {
		return this.cmsAttributeValue;
	}

	public void setCmsAttributeValue(CmsAttributeValue cmsAttributeValue) {
		this.cmsAttributeValue = cmsAttributeValue;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "value_name")
	public String getValueName() {
		return this.valueName;
	}

	public void setValueName(String valueName) {
		this.valueName = valueName;
	}

	@Column(name = "value")
	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}